<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            background-color: darkorange;
            font-size: 50px;
            height: 200px;
            width: 200px;
            text-align: center;
            place-items: center;
        }
    </style>
</head>

<body>
    <script>
        //返回0-9的随机整数
        var x = Math.floor(Math.random() * 10);
        document.write("0-9的随机数：" + x + "<br>");
        //然后菜鸟很多代码都没啥意思，一个种类的 下面就只写其中一个
    </script>
    <h3>鼠标移动形成随机数:</h3>
    <div onmousemove="this.innerHTML=Math.floor(Math.random()*101);" onmouseout="this.innerHTML=Math.floor(Math.random()*101);">鼠标移动形成随机数</div>
</body>

</html>